package com.zboot.zbootadmin.project.monitor.controller;

import com.zboot.zbootadmin.common.annotation.Log;
import com.zboot.zbootadmin.common.constant.HttpStatus;
import com.zboot.zbootadmin.common.domain.ResponseData;
import com.zboot.zbootadmin.project.monitor.entity.Server;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: zyt
 * @Description:获取服务器
 * @Date: Created in 11:00 2020/11/8
 */
@RestController
@RequestMapping("/monitor")
public class ServerController {

    @Log("查询服务器信息")
    @PreAuthorize("@zboot.hasPermi('sys:server:list')")
    @GetMapping("/server")
    public ResponseData getInfo() throws Exception
    {
        Server server = new Server();
        server.copyTo();
        return new ResponseData(HttpStatus.SUCCESS, server);
    }

}
